nlp_architect.common.core_nlp_doc.CoreNLPDoc

class nlp_architect.common.core_nlp_doc.CoreNLPDoc(doc_text: str = '', sentences: list = None)[source]

Object for core-components (POS, Dependency Relations, etc).

_doc_text

the doc text

_sentences

list of sentences, each word in a sentence is represented by a dictionary, structured as follows: {‘start’: (int), ‘len’: (int), ‘pos’: (str), ‘ner’: (str), ‘lemma’: (str), ‘gov’: (int), ‘rel’: (str)}

__init__(doc_text: str = '', sentences: list = None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(doc_text, sentences)

Initialize self.

brat_doc()

Returns doc adapted to BRAT expected input.

decoder(obj)

displacy_doc()

Return doc adapted to displacyENT expected input.

json()

Returns json representations of the object.

pretty_json()

Returns pretty json representations of the object.

sent_iter()

sent_text(i)

Attributes

doc_text

sentences

brat_doc()[source]

Returns doc adapted to BRAT expected input.

static decoder(obj)[source]
displacy_doc()[source]

Return doc adapted to displacyENT expected input.

doc_text
json()[source]

Returns json representations of the object.

pretty_json()[source]

Returns pretty json representations of the object.

sent_iter()[source]
sent_text(i)[source]
sentences